<template>
    <div>
        <mu-paper :z-depth="5">
        <div style="background-color:#2196f3">
          <br>
    <mu-avatar :size=70 >
    <img :src="avatar">
    </mu-avatar><br>
    <span style="color:white;font-size:18px">{{cname}}</span><br>
    <span style="color:white;font-size:18px">{{name}}</span><mu-divider></mu-divider>
    
    <mu-button flat color="secondary" v-if="renzheng.status===0" to="/Origanization/Authentication"> <mu-icon value="remove_circle" left></mu-icon>未认证</mu-button>
    <mu-button flat color="success"  v-if="renzheng.status===3 || checkO===1"><mu-icon value="check_circle" right></mu-icon>已认证</mu-button>
    <mu-button flat color="warning"  v-if="renzheng.status===1"><mu-icon value="remove_circle" right></mu-icon>审核中</mu-button>
        </div>
        </mu-paper> 


<mu-paper :z-depth="1" class="demo-list-wrap">
         <mu-list>
    <mu-list-item button :ripple="true" to="/index/actmanage" >
      <mu-list-item-action >
        <mu-icon value="inbox"></mu-icon>
      </mu-list-item-action>
      <mu-list-item-title>组织活动</mu-list-item-title>
    </mu-list-item>
    <mu-list-item button :ripple="true" to="/jilu">
      <mu-list-item-action>
        <mu-icon value="grade"></mu-icon>
      </mu-list-item-action>
      <mu-list-item-title>服务记录</mu-list-item-title>
    </mu-list-item>
    <mu-list-item button :ripple="true" to="/setO">
      <mu-list-item-action>
        <mu-icon value="people"></mu-icon>
      </mu-list-item-action>
      <mu-list-item-title>组织信息</mu-list-item-title>
    </mu-list-item>
    <mu-list-item button :ripple="true" to="/FoundPsw">
      <mu-list-item-action>
        <mu-icon value="edit"></mu-icon>
      </mu-list-item-action>
      <mu-list-item-title>修改密码</mu-list-item-title>
    </mu-list-item>
  </mu-list>
  <mu-divider></mu-divider>

  </mu-paper>

        <mu-button full-width color="error" @click="layout()">注销登录</mu-button>    

    </div>
</template>
<script>
import axios from "axios";
export default {
    data(){
             axios.get('/api/user/getUserMsg').then(result=>{
            let user=result.data;
           this.avatar=user.avatar   
           this.name=user.name 
           this.cname=user.cname  
           this.checkO=user.checkO 
           this.renzheng=user.renzheng
      })

return{
    avatar:'',
    name:'',
    cname:'',
    checkO:null,
    renzheng:{}
}
    },
    methods:{
        layout(){
          axios.get('/api/user/layout')
        .then(result=> {
            console.log(result);
        })
        .catch(function (err) {
            console.log(err);
        }); 
        this.$router.push('/login')
        }
    }

}
</script>
<style>
.demo-list-wrap {
  width: 100%;
}

</style>